import 'dart:developer';
import 'package:flutter/material.dart';

class DebuggerRoute extends StatefulWidget {
  const DebuggerRoute({Key? key}) : super(key: key);

  @override
  State<StatefulWidget> createState() => _DebuggerRouteState();
}

class _DebuggerRouteState extends State<DebuggerRoute> {
  void someFunction(double offset) {
    debugger(when: offset > 30);
    debugPrint("debugger.....");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Debugger"),
      ),
      body: Center(
        child: Column(
          children: [
            SizedBox.fromSize(
              size: const Size.fromHeight(20),
            ),
            ElevatedButton(
              onPressed: () => someFunction(31),
              child: const Text("debugger"),
            ),
            SizedBox.fromSize(
              size: const Size.fromHeight(20),
            ),
            ElevatedButton(
              onPressed: () => debugDumpApp(),
              child: const Text("debugDumpApp"),
            ),
            SizedBox.fromSize(
              size: const Size.fromHeight(20),
            ),
            ElevatedButton(
              onPressed: () => debugDumpRenderTree(),
              child: const Text("debugDumpRenderTree"),
            ),
          ],
        ),
      ),
    );
  }
}
